docker base image for faster builds#92
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a split Docker build (base image + SDK image) to improve build times via better layer caching, and adds GitHub Actions workflows to publish and validate multi-arch Docker images on main.
Changes:
- Add
docker/Dockerfile.sdkand refactordocker/Dockerfile.baseto be a reusable build-deps base layer. - Add workflows to publish multi-arch base/SDK images to GHCR and validate the published SDK image by building
cpp-example-collection. - Update the existing CI workflow to build using the new base+SDK Dockerfiles on pull requests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
docker/Dockerfile.sdk |
New Dockerfile that builds & installs the SDK on top of a prebuilt base image. |
docker/Dockerfile.base |
Removes SDK build steps to make this a reusable dependency base image. |
.github/workflows/docker-images.yml |
New workflow to build/push base + SDK images and publish multi-arch manifests. |
.github/workflows/docker-validate.yml |
New workflow to validate the published SDK image after docker-images completes. |
.github/workflows/builds.yml |
Updates PR CI to build using the new base+SDK Docker image flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
docker/Dockerfile.base:19
- The documented build command doesn’t pass
TARGETARCH(or explicitly enable BuildKit), but this Dockerfile relies onARG TARGETARCHlater to download the correct CMake installer. On setups where BuildKit isn’t supplyingTARGETARCH,CMAKE_ARCHcan end up empty and the build will fail. Update the instructions to either usedocker buildx build --platform ...or pass--build-arg TARGETARCH=...(and/or mention BuildKit requirement).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d610099 to
8ef3563
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Breakout Dockerfile into .base and .sdk docker files. They build the base and sdk respectively.